﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp6
{
    class StringUtilArrayUtil
    {
        public static void StringUtil()
        {
            Boolean falg;
            Console.WriteLine("请输入字符串：");
            string a = Console.ReadLine();
            if (a == null)
            {
                falg = true;
            }
            else if (a == "")
            {
                falg = true;
            }
            else
            {
                falg = false;
            }

            foreach (char item in a)
            {

                if (item == ' ')
                {
                    falg = true;
                }
                else
                {
                    falg = false;
                    break;
                }
            }
            Console.WriteLine(falg);
        }

        public static void ArrayUtil()
        {
            Boolean falg;
            Console.WriteLine("请输入字符串：");
            string a = Console.ReadLine();
            if (string.IsNullOrWhiteSpace(a))
            {
                falg = true;
            }
            else
            {
                falg = false;
            }
            Console.WriteLine(falg);
        }
        
    }
}
